package com.gjintel.framework.constant;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
public class ActivitiMap {
	
	

	/**审核人角色ID**/
	public static String AUDITOR_ID;
	
	/**受理分配人**/
	public static String SYSTEM_ID;	
	
	/**投标人ID**/
	public static String BIDDER_ID;
	
	/**采购人ID**/
	public static String BUYER_ID;
		
	/**项目负责人ID**/
	public static String MANAGER_ID;
	
	/**业务管理员ID**/
	
	public static String  BIZMANAGER_ID;
	
	/**评标专家ID**/
	
	public static String PROFESSOR_ID;
	
	/**监督人ID**/
	
	public static String SUPERVISOR_ID;
	
	/**系统管理员ID**/
	
	public static String ADMINISTRATOR_ID;
	
	/**admin 超级管理员**/
	public static String SUPERADMIN_ID;
	
	/**信息管理员**/
	public static String MESSAGER_ID;
	/**财务管理员**/
	public static String FINANCE_ID;
	/**中心审核人**/
	public static String CENTERAUDITOR_ID;

	static {
		Properties prop = new Properties();
		InputStream is = Constant.class.getClassLoader().getResourceAsStream("activitiMapping_aution.properties");
		try {
			prop.load(is);
			AUDITOR_ID = prop.getProperty("auditor");
			SYSTEM_ID = prop.getProperty("system");
			BIDDER_ID = prop.getProperty("bidder");
			BUYER_ID = prop.getProperty("buyer");
			MANAGER_ID = prop.getProperty("manager");
			BIZMANAGER_ID = prop.getProperty("bizmanager");  
			PROFESSOR_ID = prop.getProperty("professor");
			SUPERVISOR_ID = prop.getProperty("supervisor");
			ADMINISTRATOR_ID = prop.getProperty("administrator");
			SUPERADMIN_ID=prop.getProperty("superadmin");
			MESSAGER_ID=prop.getProperty("messager");
			FINANCE_ID=prop.getProperty("finance");
			CENTERAUDITOR_ID=prop.getProperty("centerAuditor");
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	/**
	 * @description 根据key获取配置文件中的value 
	 * @author wwang 
	 * @date 2016-8-25
	 * @param key
	 * @return
	 */
	public static String getProperty(String key){
		Properties prop = new Properties();
		InputStream is = Constant.class.getClassLoader().getResourceAsStream("activitiMapping_aution.properties");
		String value="";
		try {
			prop.load(is);
			value = prop.getProperty(key);
		} catch (IOException e) {
			e.printStackTrace();
		}
		return value;
	}
}
	

